package com.jdiv;

import java.awt.image.BufferedImage;

import com.jdiv.util.MaskColorImage;

/**
 * @author  Joyal
 */
public class JRegion {
  /**
 * @uml.property  name="id"
 */
private int 
  			id;


/**
 * @uml.property  name="x"
 */
private int x=0;


/**
 * @uml.property  name="y"
 */
private int y=0;


/**
 * @uml.property  name="width"
 */
private int width=0;


/**
 * @uml.property  name="height"
 */
private int height=0;


  /**
 * @uml.property  name="imgRegion"
 */
private BufferedImage imgRegion=null;
  
 public JRegion(){}

 public JRegion(int id,int x,int y,int width,int height){
 
  this.id=id;
  this.x=x;
  this.y=y;
  this.width=width;
  this.height=height;
 
  this.imgRegion= new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);  
  //this.imgRegion=MaskColorImage.maskImage(this.imgRegion);
 }
 
 /**
 * @return
 * @uml.property  name="id"
 */
public int getId() {	
	return id;
 }
 /**
 * @param id
 * @uml.property  name="id"
 */
public void setId(int id) {
	this.id = id;
 }

/**
 * @return
 * @uml.property  name="x"
 */
public int getX() {
	return x;
}

/**
 * @param x
 * @uml.property  name="x"
 */
public void setX(int x) {
	this.x = x;
}

/**
 * @return
 * @uml.property  name="y"
 */
public int getY() {
	return y;
}

/**
 * @param y
 * @uml.property  name="y"
 */
public void setY(int y) {
	this.y = y;
}

/**
 * @return
 * @uml.property  name="width"
 */
public int getWidth() {
	return width;
}

/**
 * @param width
 * @uml.property  name="width"
 */
public void setWidth(int width) {
	this.width = width;
}

/**
 * @return
 * @uml.property  name="height"
 */
public int getHeight() {
	return height;
}

/**
 * @param height
 * @uml.property  name="height"
 */
public void setHeight(int height) {
	this.height = height;
}

/**
 * @return
 * @uml.property  name="imgRegion"
 */
public BufferedImage getImgRegion() {
	return imgRegion;
}

/**
 * @param imgRegion
 * @uml.property  name="imgRegion"
 */
public void setImgRegion(BufferedImage imgRegion) {
	this.imgRegion = imgRegion;
}
 
}
